home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-04
/
love4th.zip
/
VOCABS.DOC
< prev
next >
Wrap
Text File
|
1991-10-01
|
2KB
|
53 lines
Vocabularies in L.O.V.E. Forth
==============================
L.O.V.E. Forth implements the Forth-83 standard vocabularies
with some of the words in the experimental proposal by William F.
Ragsdale. The specification for vocabularies in the Forth-83 standard
leaves much to be desired by expert and novice programmers alike.
Ragsdale's proposal solves many of the problems with a simple and
powerfull concept. His ideas have been so widely implemented that they
can be considered an integral and crucial part of the Forth-83
standard.
L.O.V.E. Forth implements the concept of a 'search order' by
means of a special stack, the vocabulary stack, which contains the
parameter field addresses of vocabularies that are to be searched when
interpreting or compiling. The search order may be inspected at any
time by typing the word ORDER.
Example:
ORDER <cr>
Displays:
Search Order: -> TOOLBOX FORTH ROOT
Definitions: FORTH
The vocabularies are currently being searched by first
searching TOOLBOX, then FORTH and finally ROOT.
All new DEFINITIONS that are compiled are currently being put into the
FORTH vocabulary.
The ROOT vocabulary is always the last vocabulary in the
search order and contains the Forth words to alter the search order, to
create new vocabularies, to list the words in a vocabulary and to
FORGET words from the dictionary.
Specifying a Search Order
-------------------------
The search order can changed at any time by executing a
combination of the words ONLY and ALSO with vocabulary names.
Example:
To compile a word into the MSDOS vocabulary while also making use of
some MSDOS file functions...
ONLY FORTH ALSO MSDOS DEFINITIONS
makes the search order:
Search Order: -> MSDOS FORTH ROOT
Definitions: MSDOS